# 2022-11-09  16:16  by  CYL  @ST
# add the .h file used in helloCpp.cpp.
INCLUDE_DIRECTORIES (../inc/)
# name .so Source CXX file as 'libhellocpp_src'.
SET(libhellocpp_src helloCpp.cpp)

# name .so File as 'hellocpp',it will be renamed as 'lib'+'hellocpp'+'.so'.
# 'SHARED' will output a .so file.(dynamic libs).
ADD_LIBRARY(hellocpp SHARED ${libhellocpp_src})
# rename 'libhellocpp.so' as 'libhellocpp.so'.
SET_TARGET_PROPERTIES(hellocpp PROPERTIES OUTPUT_NAME "hellocpp")
SET_TARGET_PROPERTIES(hellocpp PROPERTIES CLEAN_DIRECT_OUTPUT 1)

# 'STATIC' will output a .a file.(static libs).
ADD_LIBRARY(hellocpp_static STATIC ${libhellocpp_src})
# rename 'libhellocpp_static.a' as 'libhellocpp.a'.
SET_TARGET_PROPERTIES(hellocpp_static PROPERTIES OUTPUT_NAME "hellocpp")
SET_TARGET_PROPERTIES(hellocpp_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
